package com.bit.ThreadTest;

public class Test7 {
    public static void main(String[] args) {
        Thread t0 = new Thread(){
            @Override
            public void run() {
                System.out.println("0");
            }
        };
        t0.start();
        try {
            t0.join();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        Thread t1 = new Thread(){
            @Override
            public void run() {
                System.out.println("1");

            }
        };
        t1.start();
        try {
            t1.join();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        Thread t2 = new Thread(){
            @Override
            public void run() {
                System.out.println("2");

            }
        };
        t2.start();
        try {
            t2.join();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        Thread t3 = new Thread(){
            @Override
            public void run() {
                System.out.println("3");

            }
        };
        t3.start();
        try {
            t3.join();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        Thread t4 = new Thread(){
            @Override
            public void run() {
                System.out.println("4");

            }
        };
        t4.start();
        try {
            t4.join();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        Thread t5 = new Thread(){
            @Override
            public void run() {
                System.out.println("5");
            }
        };
        t5.start();
        try {
            t5.join();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
       /* t0.start();
        t1.start();
        t2.start();
        t3.start();
        t4.start();
        t5.start();*/

        System.out.println("ok");
    }
}
